<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" type="text/css" href="/css/bootstrap.min.css"/>
    <link href="/bootstraptable/bootstrap-table.min.css" rel="stylesheet">
</head>
<body>
<div class="container">
    <div style="width: 1200px;margin: 0 auto;">
        <h5 style="color: #3e79b6">您正在做的业务是：产品设计--产品档案管理--产品档案登记</h5>
    </div>

    <form class="form-horizontal" id="file_register_form">
        <div style="text-align: right;">
            <button type="button" id="add_btn" class="btn btn-info">提交</button>
            <button type="button" id="yy" class="btn btn-info">清除</button>
        </div>

        <div style="margin-bottom: 0px;" class="panel panel-primary">
            <div class="panel-heading">
                <h3 class="panel-title">主信息</h3>
            </div>
            <div class="panel-body">
                <div class="form-group has-success has-feedback" id="group-projectName">
                    <div class="col-sm-6">
                        <label class="col-sm-5 control-label" for="productName">
                            <font color=red>*</font>产品名称：
                        </label>
                        <div class="col-sm-6">
                            <input class="form-control" type="text" name="productName" id="productName"
                                   placeholder="请输入产品名称"
                            />
                            <span class='glyphicon glyphicon-ok form-control-feedback' style="color: red"></span>
                        </div>
                    </div>

                    <div class="col-sm-6">
                        <label class="col-sm-5 control-label" for="factoryName">制造商：</label>
                        <div class="col-sm-6">
                            <input class="form-control" type="text" name="factoryName" id="factoryName"
                                   placeholder="请输入制造商"
                            />
                        </div>
                    </div>
                </div>

                <div class="form-group has-success has-feedback">
                    <div class="col-sm-6">
                        <label class="col-sm-5 control-label" for="firstKindName">
                            <font color=red>*</font>I级分类：
                        </label>
                        <div class="col-sm-6">
                            <select class="form-control" name="firstKindName" id="firstKindName">
                                <option value="">请选择I级分类</option>
                                <option value="01/电子">01/电子</option>
                            </select>
                        </div>
                    </div>

                    <div class="form-group">
                        <div class="col-sm-6">
                            <label class="col-sm-5 control-label" for="secondKindName">
                                <font color=red>*</font>II级分类：
                            </label>
                            <div class="col-sm-6">
                                <select class="form-control" name="secondKindName" id="secondKindName">
                                    <option value="">请选择I级分类</option>
                                    <option value="01/计算机">01/计算机</option>
                                </select>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="form-group has-success has-feedback">
                    <div class="col-sm-6">
                        <label class="col-sm-5 control-label" for="thirdKindName">
                            <font color=red>*</font>III级分类：
                        </label>
                        <div class="col-sm-6">
                            <select class="form-control" name="thirdKindName" id="thirdKindName">
                                <option value="">请选择III级分类</option>
                                <option value="01/服务器">01/服务器</option>
                            </select>
                        </div>
                    </div>

                    <div class="form-group">
                        <div class="col-sm-6">
                            <label class="col-sm-5 control-label" for="productNick">产品简称：</label>
                            <div class="col-sm-6">
                                <input class="form-control" type="text" name="productNick" id="productNick"
                                       placeholder="请输入产品简称"
                                />
                            </div>
                        </div>
                    </div>
                </div>

                <div class="form-group has-success has-feedback">
                    <div class="col-sm-6">
                        <label class="col-sm-5 control-label"  for="type">用途类型：</label>
                        <div class="col-sm-6">
                            <select class="form-control" name="type" id="type">
                                <option value="">请选择用途类型</option>

                                <option value="Y001-1">商品</option>

                                <option value="Y001-2">物料</option>
                            </select>
                        </div>
                    </div>

                    <div class="form-group">
                        <div class="col-sm-6">
                            <label class="col-sm-5 control-label" for="productClass">档次级别：</label>
                            <div class="col-sm-6">
                                <select class="form-control" name="productClass" id="productClass">
                                    <option value="">请选择档次级别</option>

                                    <option value="D001-1">高档</option>

                                    <option value="D001-2">中档</option>

                                    <option value="D001-3">低档</option>
                                </select>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="form-group has-success has-feedback">
                    <div class="col-sm-6">
                        <label class="col-sm-5 control-label" for="listPrice">
                            <font color=red>*</font>市场单价(元)：
                        </label>
                        <div class="col-sm-6">
                            <input class="form-control" type="text" name="listPrice" id="listPrice"
                                   placeholder="请输入市场单价(元)"
                            />
                        </div>
                    </div>

                    <div class="col-sm-6">
                        <label class="col-sm-5 control-label" for="costPrice">
                            <font color=red>*</font>计划成本单价：
                        </label>
                        <div class="col-sm-6">
                            <input class="form-control" type="text" name="costPrice" id="costPrice"
                                   placeholder="请输入计划成本单价"
                            />
                        </div>
                    </div>
                </div>

                <div class="form-group has-success has-feedback">
                    <div class="col-sm-6">
                        <label class="col-sm-5 control-label" for="personalUnit">计量单位：</label>
                        <div class="col-sm-6">
                            <input class="form-control" type="text" name="personalUnit" id="personalUnit"
                                   placeholder="请输入计量单位"
                            />
                        </div>
                    </div>

                    <div class="col-sm-6">
                        <label class="col-sm-5 control-label" for="personalValue">计量值：</label>
                        <div class="col-sm-6">
                            <input class="form-control" type="text" name="personalValue" id="personalValue"
                                   placeholder="请输入计量值"
                            />
                        </div>
                    </div>
                </div>
        </div>


        <div style="margin-top:0px;" class="panel panel-primary">
            <div class="panel-heading">
                <h3 class="panel-title">辅助信息</h3>
            </div>
            <div class="panel-body">
                <div class="form-group has-success has-feedback">
                    <div class="col-sm-6">
                        <label class="col-sm-5 control-label" for="warranty">保修期：</label>
                        <div class="col-sm-6">
                            <input class="form-control" type="text" name="warranty" id="warranty"
                                   placeholder="请输入保修期"
                            />
                        </div>
                    </div>

                    <div class="col-sm-6">
                        <label class="col-sm-5 control-label" for="twinName">替代品名称：</label>
                        <div class="col-sm-6">
                            <input class="form-control" type="text" name="twinName" id="twinName"
                                   placeholder="请输入替代品名称"
                            />
                        </div>
                    </div>
                </div>

                <div class="form-group has-success has-feedback">
                    <div class="col-sm-6">
                        <label class="col-sm-5 control-label" for="twinId">替代品编号：</label>
                        <div class="col-sm-6">
                            <input class="form-control" type="text" name="twinId" id="twinId"
                                   placeholder="请输入替代品编号"
                            />
                        </div>
                    </div>

                    <div class="col-sm-6">
                        <label class="col-sm-5 control-label" for="lifecycle">生命周期(年)：</label>
                        <div class="col-sm-6">
                            <input class="form-control" type="text" name="lifecycle" id="lifecycle"
                                   placeholder="请输入生命周期(年)"
                            />
                        </div>
                    </div>
                </div>

                <div class="form-group has-success has-feedback">
                    <div class="col-sm-6">
                        <label class="col-sm-5 control-label" for="amountUnit">单位：</label>
                        <div class="col-sm-6">
                            <input class="form-control" type="text" name="amountUnit" id="amountUnit"
                                   placeholder="请输入单位"
                            />
                        </div>
                    </div>

                    <div class="col-sm-6">
                        <label class="col-sm-5 control-label" for="responsiblePerson">产品经理：</label>
                        <div class="col-sm-6">
                            <input class="form-control" type="text" name="responsiblePerson" id="responsiblePerson"
                                   placeholder="请输入产品经理"
                            />
                        </div>
                    </div>
                </div>

                <div class="form-group has-success has-feedback">
                    <div class="col-sm-6">
                        <label class="col-sm-5 control-label" for="providerGroup">供应商集合：</label>
                        <div class="col-sm-6">
                             <textarea class="form-control" name="providerGroup" id="providerGroup">

                             </textarea>
                        </div>
                    </div>

                    <div class="col-sm-6">
                        <label class="col-sm-5 control-label" for="productDescribe"> 产品描述：</label>
                        <div class="col-sm-6">
                             <textarea class="form-control" name="productDescribe" id="productDescribe">

                             </textarea>
                        </div>
                    </div>
                </div>

                <div class="form-group has-success has-feedback">
                    <div class="col-sm-6">
                        <label class="col-sm-5 control-label" for="register">登记人：</label>
                        <div class="col-sm-6">
                            <input class="form-control" type="text" name="register" id="register"
                                   placeholder="请输入登记人"
                            />
                        </div>
                    </div>

                    <div class="col-sm-6">
                        <label class="col-sm-5 control-label"for="registerTime">建档时间：</label>
                        <div class="col-sm-6">
                            <input type="text" class="form-control"
                                   id="registerTime"
                                   name="registerTime"
                                   placeholder="请输入建档时间:">
                        </div>
                    </div>
                </div>
            </div>
                </div>
        </div>
    </form>
</div>
</body>

<!-- 全局js -->
<script src="/js/jquery.min.js?v=2.1.4"></script>
<script src="/js/bootstrap.min.js?v=3.3.6"></script>
<script src="/js/plugins/metisMenu/jquery.metisMenu.js"></script>
<script src="/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
<script src="/js/plugins/layer/layer.min.js"></script>

<!-- 自定义js -->
<script src="/js/hAdmin.js?v=4.1.0"></script>
<!--<script type="text/javascript" src="/js/index.js"></script>-->

<!-- 第三方插件 -->recheck
<script src="/js/plugins/pace/pace.min.js"></script>

<script>
    $(function () {
        // 表单的保存按钮
        $("#file_register_form #add_btn").click(function () {
            let params = $("#file_register_form").serialize()
            // 发异步请求向数据库插入档案
            $.post("/design/file/add", params, function (data){
                if (data){
                    window.location="/design/design_successUI"
                }
            })
        })
    })
</script>
</html>